﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Marmat.Foundation;

namespace Marmat.Template.WinForm
{
    /// <summary>
    /// 视图窗体的控制器接口
    /// </summary>
    /// <typeparam name="Entity"></typeparam>
    /// <typeparam name="DataSource"></typeparam>
    public interface IDocumentViewFormController<Entity, DataSource> : Marmat.Foundation.IViewFormRoute, Marmat.Foundation.IViewFormController, IProvider
    {
        /// <summary>
        /// 单据管理实例
        /// </summary>
        DocumentManagement<Entity, DataSource> Management { get; set; }

        /// <summary>
        /// 视图窗体
        /// </summary>
        IDocumentViewForm<Entity, DataSource> FormPanel { get; set; }

        /// <summary>
        /// 刷新数据。
        /// </summary>
        void Load();
    }

    /// <summary>
    /// 视图窗体的控制器接口
    /// </summary>
    /// <typeparam name="Entity"></typeparam>
    public interface IDocumentViewFormController<Entity> : IDocumentViewFormController<Entity, Entity[]>
    {
    }

    /// <summary>
    /// 视图窗体的控制器接口
    /// </summary>
    public interface IViewFormController : IDocumentViewFormController<System.Data.DataRow, System.Data.DataTable>
    {
    }
}
